<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script type="text/javascript">
			function show(){
				  var xhr=new XMLHttpRequest();
					 xhr.onreadystatechange=function(){
						 if(xhr.readyState==4 && xhr.status==200){
						 var r=xhr.responseText;
						var arr=JSON.parse(r);
						
						var str=`
						<table border=1 cellpadding="" cellspacing="0">
							<tr>
								<th>编号</th>
								<th>用户</th>
								<th>密码</th>
								<th>邮箱</th>
								<th>电话</th>
								<th>头像</th>
								<th>真实姓名</th>
								<th>姓名</th>
							</tr>

						`;
						
						for(var gender="不详",i=0;i<arr.length;i++){
							if(arr[i].gender==1){
								  gender="男";
							}else{
								gender="女";
							}
							str+=`
							   <tr>
							    <td>${arr[i].uid}</td>
							    <td>${arr[i].uname}</td>
							    <td>${arr[i].upwd}</td>
							    <td>${arr[i].emali}</td>
							    <td>${arr[i].phone}</td>
							    <td>${arr[i].avatar}</td>
							    <td>${arr[i].user_name}</td>
							    <td>${gender}</td>
							   </tr>
							
							`;
						}
						
						str+=`</table>`;
						d1.innerHTML=str;
						}
					 }
					 xhr.open("get",'/pro/v1/list',true);
					 xhr.send();
			}
		</script>
	</head>
	<body onload="show()">
		   <div id="d1">
		   	
		   </div>
	</body>
</html>
<table cellspacing=""></table>